import { ApiProperty } from '@nestjs/swagger';
import { ResOp } from 'src/shared/interceptor/response.interceptor';

class UserReponseDataDto {
  @ApiProperty({ type: 'number', example: 1, description: '用户id' })
  id: number;

  @ApiProperty({ example: '1482983333@qq.com', description: '用户名(邮箱)' })
  username: string;

  @ApiProperty({
    example: ['user', 'admin'],
    description: '角色暂定(user、admin)',
    required: false,
  })
  roles?: string[];
}

export class UserInfoReponseDto extends ResOp {
  @ApiProperty({ type: UserReponseDataDto })
  data: UserReponseDataDto;
}
